<html>
	<title>Search Screen</title>
	<body>
		<form method="GET" action="resultModule.php" >
		<table>
			<tr>
				<td>Insert Wine Name :</td> <td><input type="text" name="wineName" /></td>
			</tr>
			<tr>
				<td>Insert Winery Name :</td> <td><input type="text" name="wineryName" /> </td>
			</tr>
			<tr>
				<td>Limited to State :</td>
				<td><select name="state">
						<option value="-">-</option>
						<option value="ALL">ALL</option>
						{section name=i loop=$stateQuery}
							<option value = "{$stateQuery[i].state}">{$stateQuery[i].state}</option> 
						{/section}
					</select>
				</td>
			</tr>
			<tr>
				<td>Limited to Region :</td>
				<td><select name="Region">
						<option value="-">-</option>
						{section name=i loop=$regionQuery}
							<option value = "{$regionQuery[i].region_id}">{$regionQuery[i].region_name}</option> 
						{/section}
					</select>
				</td>
			</tr>
			<tr>
				<td>Grape Variety</td>
				<td><select name="grapeVariety">
						<option value="-">-</option>
						<option value="ALL">ALL</option>
						{section name=i loop=$grapeVarietyQuery}
							<option value = "{$grapeVarietyQuery[i].variety_id}">{$grapeVarietyQuery[i].variety}</option> 
						{/section}
					</select>
				</td>
			</tr>
			<tr>
				<td>Start Year :</td>
				<td><select name="rangeFrom">
						<option value="-">-</option>
							{section name=i loop=$from}
								<option value = "{$from[i].year}">{$from[i].year}</option> 
							{/section}
					</select>
				</td>
			</tr>
			<tr>
				<td>End Year :</td>
				<td><select name="rangeTo">
						<option value="-">-</option>
						{section name=i loop=$to}
							<option value = "{$to[i].year}">{$to[i].year}</option> 
						{/section}
					</select>
				</td>
			</tr>
			<tr>
				<td>Minimum number of wine in stock :</td>
				<td><input type="text" name="minNoStock" /></td>
			</tr>
			<tr>
				<td>Minimum number of wine ordered :</td>
				<td><input type="text" name="minNoOrder" /></td>
			</tr>
		</table><br>
		<input type = "submit" value="SUBMIT"/>
		</form>
		{$wew}
		{if $isSessionActive eq "false"}
			<font color="red">{$message}</font><br>
			<a href="searchScreen.php?session=true">Start Session!</a>
		{else}
			<b>SESSION IS STARTED!</b>
		{/if}
	</body>
</html>